<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
	<!--导入elementUI样式-->
    <link rel="stylesheet" href="element-ui-2.13.0/lib/theme-chalk/index.css">
	<!--导入vue js文件-->
    <script src="js/vue-v2.6.10.js"></script>
	<!--导入elementUI js文件-->
    <script src="element-ui-2.13.0/lib/index.js"></script>

</head>
<body>
    <div id="app">
        <el-button :plain="true" @click="open2">成功</el-button>
        <el-button :plain="true" @click="open3">警告</el-button>
        <el-button :plain="true" @click="open1">消息</el-button>
        <el-button :plain="true" @click="open4">错误</el-button>
    </div>
</body>
<script type="text/javascript">
    new Vue({
        el: "#app",
        methods: {
            open1() {
                //this.$message('这是一条消息提示');
                //也可以这么写
                this.$message({
                    message: '这是一条消息提示',
                    type: 'info'
                });
            },
            open2() {
                this.$message({
                    message: '恭喜你，这是一条成功消息',
                    type: 'success'
                });
            },
            open3() {
                this.$message({
                    message: '警告哦，这是一条警告消息',
                    type: 'warning'
                });
            },
            open4() {
                //this.$message.error('错了哦，这是一条错误消息');
                //也可以这么写
                this.$message({
                    message: '错了哦，这是一条错误消息',
                    type: 'error'
                });
            }
        }
    });
</script>
</html>